<?php

namespace App\Observers\Game\Center;

use App\Caches\Game\AppWebpageCache;
use App\Models\Game\Center\AppWebpage;

class AppWebpageObserver
{
    /**
     * @param AppWebpage $model
     */
    public function created(AppWebpage $model)
    {
        // AppWebpageCache::set($model);
    }

    /**
     * @param AppWebpage $model
     */
    public function updated(AppWebpage $model)
    {
        // 删除原数据
        // AppWebpageCache::del($model->replicate()->fill($model->getOriginal()));
        // AppWebpageCache::set($model);
    }

    /**
     * @param AppWebpage $model
     */
    public function deleted(AppWebpage $model)
    {
        AppWebpageCache::del($model);
    }
}
